#pragma once

#include "DesktopFrame.h"

class DesktopFrameWin:public DesktopFrame
{
public:
	~DesktopFrameWin() override;

	static std::unique_ptr<DesktopFrameWin>
		Create(DesktopSize size, SharedMemoryFactory* shared_memory_factory, HDC hdc);

	HBITMAP bitmap() { return bitmap_; }

private:
	DesktopFrameWin(DesktopSize size,
		int stride,
		uint8_t* data,
		std::unique_ptr<SharedMemory> shared_memory,
		HBITMAP bitmap);

	HBITMAP bitmap_;
	std::unique_ptr<SharedMemory> owned_shared_memory_;

	DesktopFrameWin(const DesktopFrameWin&) = delete;
	DesktopFrameWin& operator=(const DesktopFrameWin&) = delete;
};

